package com.cn.jinl.domain;

import com.cn.jinl.utils.CommonUtil;
import com.google.common.collect.ImmutableMap;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;
import java.util.Map;

public class AbandonMaterial {
    private String id;

    private String abandonType;

    private String abandonTime;

    private String whiteDay;

    private String processName;

    private String catetoryName;

    private String weight;

    private String sendMaterialUser;

    private String acceptMaterialUser;

    private String status;

    private Date createTime;

    private Date updateTime;

    private int count;

    public static final transient Map<String, String> TYPEMAP =
            ImmutableMap.of("1", "料头", "2", "可回收", "3", "不可回收", "4", "彩膜");

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getAbandonTypeCn() {
        return TYPEMAP.get(getAbandonType());
    }
    public String getAbandonType() {
        return abandonType;
    }

    public void setAbandonType(String abandonType) {
        this.abandonType = abandonType == null ? null : abandonType.trim();
    }

    public String getAbandonTime() {
        return abandonTime;
    }

    public void setAbandonTime(String abandonTime) {
        this.abandonTime = abandonTime == null ? null : abandonTime.trim();
    }

    public String getWhiteDayCn() {
        if(StringUtils.equals(getWhiteDay(),"1")){
            return "白班";
        }
        return "夜班";
    }

    public String getWhiteDay() {
        return whiteDay;
    }

    public void setWhiteDay(String whiteDay) {
        this.whiteDay = whiteDay == null ? null : whiteDay.trim();
    }

    public String getProcessName() {
        return processName;
    }

    public void setProcessName(String processName) {
        this.processName = processName == null ? null : processName.trim();
    }

    public String getCatetoryName() {
        return catetoryName;
    }

    public void setCatetoryName(String catetoryName) {
        this.catetoryName = catetoryName == null ? null : catetoryName.trim();
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight == null ? null : weight.trim();
    }

    public String getSendMaterialUser() {
        return sendMaterialUser;
    }

    public void setSendMaterialUser(String sendMaterialUser) {
        this.sendMaterialUser = sendMaterialUser == null ? null : sendMaterialUser.trim();
    }

    public String getAcceptMaterialUser() {
        return acceptMaterialUser;
    }

    public void setAcceptMaterialUser(String acceptMaterialUser) {
        this.acceptMaterialUser = acceptMaterialUser == null ? null : acceptMaterialUser.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getCreateTimeFt(){
        String formatTime = CommonUtil.getStrTime(getCreateTime(),"yyyy-MM-dd HH:mm:ss");
        return formatTime;
    }
}